<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="app" uri="http://www.wanrenhui.com" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
	  <%@include file="/res/include/base-head.jsp"%>
	  <%@include file="/res/include/jquery-easyui.jsp"%>
	<script type="text/javascript" src="${pageContext.request.contextPath}/res/js/community/communityNotice.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/res/js/area.js"></script>
  </head>
  <body>
  <div id="toolbar" style="padding:2px;">
    <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="admin.communityNotice.toAdd();">添加</a>
</div>
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'north',border:false,split:false">
	    	<form id="query-form" class="search_form clearfix">
	            <dl>
					<dt>省：</dt>
					 <dd>
	                	<select name="provinceId" id="provinceId" onchange="admin.area.changeProvince()" class="txt grid-8">
	                		<c:forEach var="province" items="${provinceList}">  
                                <option value="${province.id}">${province.name}</option>  
                            </c:forEach>
	                	</select>
	                </dd>
				</dl>
				<dl>
					<dt>市：</dt>
					 <dd>
	                	<select name="cityId" id="cityId" onchange="admin.area.changeCity()" class="txt grid-8">
	                		<option value="">--请选择--</option>
	                	</select>
	                </dd>
				</dl>
				<dl>
					<dt>区：</dt>
					 <dd>
	                	<select name="areaId" id="areaId" onchange="admin.area.changeArea()" class="txt grid-8">
	                		<option value="">--请选择--</option>
	                	</select>
	                </dd>
				</dl>
				<dl>
					<dt>社区：</dt>
					<dd>
						<select name="communityId" id="communityId" class="txt grid-8">
	                		<option value="">--请选择--</option>
	                	</select>
					</dd>
				</dl>
	            <p class="search_form_btn">
	            	<input type="button" value="搜索" class="icon_serach" onclick="admin.communityNotice.query()" />
	            </p>
	        </form>
	  	</div>
	    <div data-options="region:'center',border:false">
		    <table id="datagrid" data-options="url:'${pageContext.request.contextPath}/community/notice/list',toolbar:'#toolbar'">
				<thead>
					<tr>
						<th data-options="field:'communityName',width:80,align:'center'">社区名称</th>
						<th data-options="field:'content',width:500,align:'center' ">内容</th>
			            <th data-options="field:'id',align:'center',width:150,formatter:formatOperation">管理操作</th>
					</tr>
				</thead>
			</table>
	  	</div>
	</div>
	<script>
		function formatOperation(value,row,index) {
			var l_html = '';
			l_html += '<a href="javascript:;" class="table_link" onclick="admin.communityNotice.detail('+row.id+')">查看</a>';
			l_html += '<a href="javascript:;" class="table_link" onclick="admin.communityNotice.toUpdate('+row.id+')">编辑</a>';
			l_html += '<a href="javascript:;" class="table_link" onclick="admin.communityNotice.toDelete('+row.id+')">删除</a>';
			return l_html;
		}
	</script>
  </body>
</html>
